package  cn.copera.dyy.common.utils.filter.builder;

public class DateareaField implements Field, Cloneable {
	private String name, start, logical, end;

	@Override
	public Object clone() throws CloneNotSupportedException {
		return super.clone();
	}

	public String getEnd() {
		return end;
	}

	public void setEnd(String end) {
		this.end = end;
	}

	public String getLogical() {
		return logical;
	}

	public void setLogical(String logical) {
		this.logical = logical;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getStart() {
		return start;
	}

	public void setStart(String value) {
		this.start = value;
	}

	public String getSql() {
		if (name == null || (start == null && end == null) || logical == null)
			return null;

		try {
			return Utility.getDataArea(start, end, name);
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		return null;
	}
}
